package com.sencorsta.ids.talk;

import com.sencorsta.ids.core.application.Application;

import java.io.File;


public class rpTalk extends Application {

    static {
        instance = new rpTalk();
    }

    public static rpTalk getInstance() {
        return (rpTalk) instance;
    }


    public static void main(String[] args) {
        String url="C:\\Users\\Administrator\\Desktop\\ss";
        File file = new File(url);
            File[] files = file.listFiles();
            long it=90000000100L;
            for (var item:files){
                it++;
                File NewFileName =new File(url+"\\"+it+".jpg");
                item.renameTo(NewFileName);
                System.out.println(item.getName());
            }

    }

    //	改变目录下文件的名称
    static void changename(File OldFileName) {
        if (OldFileName.isDirectory()) {
            File[] files = OldFileName.listFiles();
            for (int i = 0; i < files.length; i++) {
//				新文件的绝对路径拼接需要改为的名称与格式
                File NewFileName = new File("test\\"+"AfterFile"+i+".txt");
                files[i].renameTo(NewFileName);
            }
        }
        System.out.println("finsh");
    }


}
